#include<iostream>
#include<string>
#include<memory>
#include"HttpServer.hpp"
#include"Log.hpp"

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        std::cout<<"Usage: \n\t"<< argv[0] << " PORT" << std::endl;
        exit(4);
    }
    //LOG(INFO, "Debug Project!");

    int port = atoi(argv[1]);
    std::shared_ptr<HttpServer> http_server(new HttpServer(port));//智能指针

    http_server->InitServer();
    http_server->Loop();
    return 0;
}